function GameMenuSpecial()
{
  RenderMap();
  
  WindowStyle.drawWindow(8, 8, 130, 12);
  Font.drawText(10, 10, "Select an option");
    
  var ItemMenu = new Menu();
  ItemMenu.font         = Font;
  ItemMenu.window_style = WindowStyle;
  ItemMenu.arrow        = Arrow;

  if (Player.temp == "Bard")
  {
  ItemMenu.addItem("Song", GameMenuSpecialSong);   
  ItemMenu.addItem("White", GameMenuSpecialWhite);   
  ItemMenu.addItem("Black", GameMenuSpecialBlack);   
  }
  else if (Player.temp == "Mage")
  {
  ItemMenu.addItem("White", GameMenuSpecialWhite);   
  ItemMenu.addItem("Black", GameMenuSpecialBlack);   
  ItemMenu.addItem("Custom", GameMenuSpecialCustom);   
  }
  else if (Player.temp == "Soldier")
  {
    if (Player.active == "Player1")
    {
      ItemMenu.addItem("Dash", GameMenuSpecialSoldierDash);       
      if (Playersoldier.dualcombo == true)
      {
      ItemMenu.addItem("Dual Combo", GameMenuSpecialDualCombo);   
      }
      if (Playersoldier.sworddrain == true)
      {
      ItemMenu.addItem("Sword Drain", GameMenuSpecialSwordDrain);   
      }
      if (Playersoldier.charge == true)
      {
      ItemMenu.addItem("Charge", GameMenuSpecialCharge);   
      }
      if (Playersoldier.quadslice == true)
      {
      ItemMenu.addItem("Quad Slice", GameMenuSpecialQuadSlice);   
      }
    }
    else if (Player.active == "Player2")
    {
      ItemMenu.addItem("Dash", GameMenuSpecialSoldierDash);       
      if (Player2soldier.dualcombo == true)
      {
      ItemMenu.addItem("Dual Combo", GameMenuSpecialDualCombo);   
      }
      if (Player2soldier.sworddrain == true)
      {
      ItemMenu.addItem("Sword Drain", GameMenuSpecialSwordDrain);   
      }
      if (Player2soldier.charge == true)
      {
      ItemMenu.addItem("Charge", GameMenuSpecialCharge);   
      }
      if (Player2soldier.quadslice == true)
      {
      ItemMenu.addItem("Quad Slice", GameMenuSpecialQuadSlice);   
      }
    }
    else if (Player.active == "Player3")
    {
      ItemMenu.addItem("Dash", GameMenuSpecialSoldierDash);       
      if (Player3soldier.dualcombo == true)
      {
      ItemMenu.addItem("Dual Combo", GameMenuSpecialDualCombo);   
      }
      if (Player3soldier.sworddrain == true)
      {
      ItemMenu.addItem("Sword Drain", GameMenuSpecialSwordDrain);   
      }
      if (Player3soldier.charge == true)
      {
      ItemMenu.addItem("Charge", GameMenuSpecialCharge);   
      }
      if (Player3soldier.quadslice == true)
      {
      ItemMenu.addItem("Quad Slice", GameMenuSpecialQuadSlice);   
      }
    }
  }
  else if (Player.temp == "Ranger")
  {
    ItemMenu.addItem("Peep", GameMenuSpecialRangerPeep);   
    ItemMenu.addItem("Encounter", GameMenuSpecialRangerEncounter);   
    if (Player.active == "Player1")
    {
      if (Playerranger.animals == true)
      {
      ItemMenu.addItem("Animals", GameMenuSpecialRangerAnimals);   
      }
      if (Playerranger.defup == true)
      {
      ItemMenu.addItem("Defense-Up", GameMenuSpecialRangerDefup);   
      }
      if (Playerranger.powerup == true)
      {
      ItemMenu.addItem("Power-Up", GameMenuSpecialRangerPowerup);   
      }
      if (Playerranger.evade == true)
      {
      ItemMenu.addItem("Evade-Up", GameMenuSpecialRangerEvade);   
      }
      if (Playerranger.heal == true)
      {
      ItemMenu.addItem("Heal", GameMenuSpecialRangerHeal);   
      }
      if (Playerranger.heal2 == true)
      {
      ItemMenu.addItem("Heal 2", GameMenuSpecialRangerHeal2);   
      }
      if (Playerranger.heal3 == true)
      {
      ItemMenu.addItem("Heal 3", GameMenuSpecialRangerHeal3);   
      }
    }
    if (Player.active == "Player2")
    {
      if (Player2ranger.animals == true)
      {
      ItemMenu.addItem("Animals", GameMenuSpecialRangerAnimals);   
      }
      if (Player2ranger.defup == true)
      {
      ItemMenu.addItem("Defense-Up", GameMenuSpecialRangerDefup);   
      }
      if (Player2ranger.powerup == true)
      {
      ItemMenu.addItem("Power-Up", GameMenuSpecialRangerPowerup);   
      }
      if (Player2ranger.evade == true)
      {
      ItemMenu.addItem("Evade", GameMenuSpecialRangerEvade);   
      }
      if (Player2ranger.heal == true)
      {
      ItemMenu.addItem("Heal", GameMenuSpecialRangerHeal);   
      }
      if (Player2ranger.heal2 == true)
      {
      ItemMenu.addItem("Heal 2", GameMenuSpecialRangerHeal2);   
      }
      if (Player2ranger.heal3 == true)
      {
      ItemMenu.addItem("Heal 3", GameMenuSpecialRangerHeal3);   
      }
    }
    if (Player.active == "Player3")
    {
      if (Player3ranger.animals == true)
      {
      ItemMenu.addItem("Animals", GameMenuSpecialRangerAnimals);   
      }
      if (Player3ranger.defup == true)
      {
      ItemMenu.addItem("Defense-Up", GameMenuSpecialRangerDefup);   
      }
      if (Player3ranger.powerup == true)
      {
      ItemMenu.addItem("Power-Up", GameMenuSpecialRangerPowerup);   
      }
      if (Player3ranger.evade == true)
      {
      ItemMenu.addItem("Evade", GameMenuSpecialRangerEvade);   
      }
      if (Player3ranger.heal == true)
      {
      ItemMenu.addItem("Heal", GameMenuSpecialRangerHeal);   
      }
      if (Player3ranger.heal2 == true)
      {
      ItemMenu.addItem("Heal 2", GameMenuSpecialRangerHeal2);   
      }
      if (Player3ranger.heal3 == true)
      {
      ItemMenu.addItem("Heal 3", GameMenuSpecialRangerHeal3);   
      }
    }
  }
    ItemMenu.addItem("Cancel", GameMenu);
    ItemMenu.execute(6, 34, 272, 40);
}
function GameMenuSpecialWhite()
{

  RenderMap();
  
  WindowStyle.drawWindow(8, 8, 90, 12);
  Font.drawText(10, 10, "What spell?");
    
  var ItemMenu = new Menu();
  ItemMenu.font         = Font;
  ItemMenu.window_style = WindowStyle;
  ItemMenu.arrow        = Arrow;

  if (Player.active == "Player1")
  {
    ItemMenu.addItem("Cure", GameMenuSpecialWMagicCure);   
    if (Playerwmagic.peep == true)
    {
    ItemMenu.addItem("Peep", GameMenuSpecialWMagicPeep);   
    }
    if (Playerwmagic.light == true)
    {
    ItemMenu.addItem("Light", GameMenuSpecialWMagicLight);   
    }
    if (Playerwmagic.curse == true)
    {
    ItemMenu.addItem("Curse", GameMenuSpecialWMagicCurse);   
    }
    if (Playerwmagic.sleep == true)
    {
    ItemMenu.addItem("Sleep", GameMenuSpecialWMagicSleep);   
    }
    if (Playerwmagic.life == true)
    {
    ItemMenu.addItem("Life", GameMenuSpecialWMagicLife);   
    }
    if (Playerwmagic.cure2 == true)
    {
    ItemMenu.addItem("Cure 2", GameMenuSpecialWMagicCure2);   
    }
    if (Playerwmagic.regain == true)
    {
    ItemMenu.addItem("Regain", GameMenuSpecialWMagicRegain);   
    }
    if (Playerwmagic.powerup == true)
    {
    ItemMenu.addItem("Power-Up", GameMenuSpecialWMagicPowerup);   
    }
    if (Playerwmagic.defup == true)
    {
    ItemMenu.addItem("Defense-Up", GameMenuSpecialWMagicDefup);   
    }
    if (Playerwmagic.haste == true)
    {
    ItemMenu.addItem("Haste", GameMenuSpecialWMagicHaste);   
    }
    if (Playerwmagic.slow == true)
    {
    ItemMenu.addItem("Slow", GameMenuSpecialWMagicSlow);   
    }
    if (Playerwmagic.stop == true)
    {
    ItemMenu.addItem("Stop", GameMenuSpecialWMagicStop);   
    }
    if (Playerwmagic.cure3 == true)
    {
    ItemMenu.addItem("Cure 3", GameMenuSpecialWMagicCure3);   
    }
    if (Playerwmagic.safe == true)
    {
    ItemMenu.addItem("Safe", GameMenuSpecialWMagicSafe);   
    }
    if (Playerwmagic.megacure == true)
    {
    ItemMenu.addItem("Mega-Cure", GameMenuSpecialWMagicMegacure);   
    }
    if (Playerwmagic.recover == true)
    {
    ItemMenu.addItem("Recover", GameMenuSpecialWMagicRecover);   
    }
    ItemMenu.addItem("Cancel", GameMenu);
    ItemMenu.execute(6, 34, 272, 40);
  }
  else if (Player.active == "Player2")
  {
    ItemMenu.addItem("Cure", GameMenuSpecialWMagicCure);   
    if (Player2wmagic.peep == true)
    {
    ItemMenu.addItem("Peep", GameMenuSpecialWMagicPeep);   
    }
    if (Player2wmagic.light == true)
    {
    ItemMenu.addItem("Light", GameMenuSpecialWMagicLight);   
    }
    if (Player2wmagic.curse == true)
    {
    ItemMenu.addItem("Curse", GameMenuSpecialWMagicCurse);   
    }
    if (Player2wmagic.sleep == true)
    {
    ItemMenu.addItem("Sleep", GameMenuSpecialWMagicSleep);   
    }
    if (Player2wmagic.life == true)
    {
    ItemMenu.addItem("Life", GameMenuSpecialWMagicLife);   
    }
    if (Player2wmagic.cure2 == true)
    {
    ItemMenu.addItem("Cure 2", GameMenuSpecialWMagicCure2);   
    }
    if (Player2wmagic.regain == true)
    {
    ItemMenu.addItem("Regain", GameMenuSpecialWMagicRegain);   
    }
    if (Player2wmagic.powerup == true)
    {
    ItemMenu.addItem("Power-Up", GameMenuSpecialWMagicPowerup);   
    }
    if (Player2wmagic.defup == true)
    {
    ItemMenu.addItem("Defense-Up", GameMenuSpecialWMagicDefup);   
    }
    if (Player2wmagic.haste == true)
    {
    ItemMenu.addItem("Haste", GameMenuSpecialWMagicHaste);   
    }
    if (Player2wmagic.slow == true)
    {
    ItemMenu.addItem("Slow", GameMenuSpecialWMagicSlow);   
    }
    if (Player2wmagic.stop == true)
    {
    ItemMenu.addItem("Stop", GameMenuSpecialWMagicStop);   
    }
    if (Player2wmagic.cure3 == true)
    {
    ItemMenu.addItem("Cure 3", GameMenuSpecialWMagicCure3);   
    }
    if (Player2wmagic.safe == true)
    {
    ItemMenu.addItem("Safe", GameMenuSpecialWMagicSafe);   
    }
    if (Player2wmagic.megacure == true)
    {
    ItemMenu.addItem("Mega-Cure", GameMenuSpecialWMagicMegacure);   
    }
    if (Player2wmagic.recover == true)
    {
    ItemMenu.addItem("Recover", GameMenuSpecialWMagicRecover);   
    }
    ItemMenu.addItem("Cancel", GameMenu);
    ItemMenu.execute(6, 34, 272, 40);
  }
  else if (Player.active == "Player3")
  {
    ItemMenu.addItem("Cure", GameMenuSpecialWMagicCure);   
    if (Player3wmagic.peep == true)
    {
    ItemMenu.addItem("Peep", GameMenuSpecialWMagicPeep);   
    }
    if (Player3wmagic.light == true)
    {
    ItemMenu.addItem("Light", GameMenuSpecialWMagicLight);   
    }
    if (Player3wmagic.curse == true)
    {
    ItemMenu.addItem("Curse", GameMenuSpecialWMagicCurse);   
    }
    if (Player3wmagic.sleep == true)
    {
    ItemMenu.addItem("Sleep", GameMenuSpecialWMagicSleep);   
    }
    if (Player3wmagic.life == true)
    {
    ItemMenu.addItem("Life", GameMenuSpecialWMagicLife);   
    }
    if (Player3wmagic.cure2 == true)
    {
    ItemMenu.addItem("Cure 2", GameMenuSpecialWMagicCure2);   
    }
    if (Player3wmagic.regain == true)
    {
    ItemMenu.addItem("Regain", GameMenuSpecialWMagicRegain);   
    }
    if (Player3wmagic.powerup == true)
    {
    ItemMenu.addItem("Power-Up", GameMenuSpecialWMagicPowerup);   
    }
    if (Player3wmagic.defup == true)
    {
    ItemMenu.addItem("Defense-Up", GameMenuSpecialWMagicDefup);   
    }
    if (Player3wmagic.haste == true)
    {
    ItemMenu.addItem("Haste", GameMenuSpecialWMagicHaste);   
    }
    if (Player3wmagic.slow == true)
    {
    ItemMenu.addItem("Slow", GameMenuSpecialWMagicSlow);   
    }
    if (Player3wmagic.stop == true)
    {
    ItemMenu.addItem("Stop", GameMenuSpecialWMagicStop);   
    }
    if (Player3wmagic.cure3 == true)
    {
    ItemMenu.addItem("Cure 3", GameMenuSpecialWMagicCure3);   
    }
    if (Player3wmagic.safe == true)
    {
    ItemMenu.addItem("Safe", GameMenuSpecialWMagicSafe);   
    }
    if (Player3wmagic.megacure == true)
    {
    ItemMenu.addItem("Mega-Cure", GameMenuSpecialWMagicMegacure);   
    }
    if (Player3wmagic.recover == true)
    {
    ItemMenu.addItem("Recover", GameMenuSpecialWMagicRecover);   
    }
    ItemMenu.addItem("Cancel", GameMenu);
    ItemMenu.execute(6, 34, 272, 340);
  }
}

function GameMenuSpecialWMagicCure()
{
SpecialThing("Cure", "The first white magic learned.  Heals a person's hp.", "5", "Heals a target's hp");
}
function GameMenuSpecialWMagicPeep()
{
SpecialThing("Peep", "A simple spell that senses a target's stats.", "5", "Senses a target's stats");
}
function GameMenuSpecialWMagicLight()
{
SpecialThing("Light", "A spell that damages one target with holy magic.", "12", "Attacks one target with holy magic");
}
function GameMenuSpecialWMagicCurse()
{
SpecialThing("Curse", "A spell that slightly lowers a target's attack, defense, and evade.", "12", "Lowers attack, defense, and evade by 25%");
}
function GameMenuSpecialWMagicSleep()
{
SpecialThing("Sleep", "A spell that stops a monster during battle.", "12", "Stops a target for one turn");
}
function GameMenuSpecialWMagicLife()
{
SpecialThing("Life", "A spell that heals the wounds of an injuried person.", "30", "Heals wounds of one person.");
}
function GameMenuSpecialWMagicCure2()
{
SpecialThing("Cure 2", "A more advanced version of the cure magic.", "25", "Heals a target's hp");
}
function GameMenuSpecialWMagicRegain()
{
SpecialThing("Regain", "A spell used in battle that recovers hp over time.", "25", "Heals a target's hp over time");
}
function GameMenuSpecialWMagicPowerup()
{
SpecialThing("Power-Up", "A spell used in battle that increases a target's attack power.", "15", "Increases attack power of one person");
}
function GameMenuSpecialWMagicDefup()
{
SpecialThing("Defense-Up", "A spell used in battle that increases a target's defense power.", "15", "Increases defense power of one person");
}
function GameMenuSpecialWMagicHaste()
{
SpecialThing("Haste", "A spell used in battle that increases a target's evade.", "15", "Increases the evade of one person");
}
function GameMenuSpecialWMagicSlow()
{
SpecialThing("Slow", "A spell that lowers a target's ability to evade attacks.", "15", "Lowers one target's evade");
}
function GameMenuSpecialWMagicStop()
{
SpecialThing("Stop", "A spell that stops a monster for a short while.", "30", "Stops one target for three turns");
}
function GameMenuSpecialWMagicCure3()
{
SpecialThing("Cure 3", "A more advanced form of the cure spell that heals all of the party.", "45", "Heals hp of the entire party");
}
function GameMenuSpecialWMagicSafe()
{
SpecialThing("Safe", "A spell that allows a tent to be used anywhere.", "75", "Uses a tent");
}
function GameMenuSpecialWMagicLife2()
{
SpecialThing("Life 2", "A spell that heals the wounds and hp of an injuried person.", "75", "Fully heals a wounded person.");
}
function GameMenuSpecialWMagicMegacure()
{
SpecialThing("Mega-Cure", "A the high level cure spell that gives major healing to the party.", "125", "Heals the entire party");
}
function GameMenuSpecialWMagicRecover()
{
SpecialThing("Recover", "The ultimate white magic.  Fully heals all targets, even if wounded.", "200", "Fully restores hp of all party members");
}

function GameMenuSpecialBlack()
{

  RenderMap();
  
  WindowStyle.drawWindow(8, 8, 90, 12);
  Font.drawText(10, 10, "What spell?");
    
  var ItemMenu = new Menu();
  ItemMenu.font         = Font;
  ItemMenu.window_style = WindowStyle;
  ItemMenu.arrow        = Arrow;

    ItemMenu.addItem("Fire", GameMenuSpecialBMagicFire);   
    ItemMenu.addItem("Ice", GameMenuSpecialBMagicIce);   
    ItemMenu.addItem("Lit", GameMenuSpecialBMagicLit);   

  if (Player.active == "Player1")
  {
    if (Playerbmagic.earth == true)
    {
    ItemMenu.addItem("Earth", GameMenuSpecialBMagicEarth);   
    }
    if (Playerbmagic.drainhp == true)
    {
    ItemMenu.addItem("Drain Hp", GameMenuSpecialBMagicDrainhp);   
    }
    if (Playerbmagic.fire2 == true)
    {
    ItemMenu.addItem("Fire 2", GameMenuSpecialBMagicFire2);   
    }
    if (Playerbmagic.ice2 == true)
    {
    ItemMenu.addItem("Ice 2", GameMenuSpecialBMagicIce2);   
    }
    if (Playerbmagic.lit2 == true)
    {
    ItemMenu.addItem("Lit 2", GameMenuSpecialBMagicLit2);   
    }
    if (Playerbmagic.earth2 == true)
    {
    ItemMenu.addItem("Earth 2", GameMenuSpecialBMagicEarth2);   
    }
    if (Playerbmagic.drainmp == true)
    {
    ItemMenu.addItem("Drain Mp", GameMenuSpecialBMagicDrainmp);   
    }
    if (Playerbmagic.aero == true)
    {
    ItemMenu.addItem("Aero", GameMenuSpecialBMagicAero);   
    }
    if (Playerbmagic.water == true)
    {
    ItemMenu.addItem("Water", GameMenuSpecialBMagicWater);   
    }
    if (Playerbmagic.fire3 == true)
    {
    ItemMenu.addItem("Fire 3", GameMenuSpecialBMagicFire3);   
    }
    if (Playerbmagic.ice3 == true)
    {
    ItemMenu.addItem("Ice 3", GameMenuSpecialBMagicIce3);   
    }
    if (Playerbmagic.lit3 == true)
    {
    ItemMenu.addItem("Lit 3", GameMenuSpecialBMagicLit3);   
    }
    if (Playerbmagic.earth3 == true)
    {
    ItemMenu.addItem("Earth 3", GameMenuSpecialBMagicEarth3);   
    }
    if (Playerbmagic.aera == true)
    {
    ItemMenu.addItem("Aera", GameMenuSpecialBMagicAera);   
    }
    if (Playerbmagic.tidelwave == true)
    {
    ItemMenu.addItem("Tidel Wave", GameMenuSpecialBMagicTidelwave);   
    }
    if (Playerbmagic.metra == true)
    {
    ItemMenu.addItem("Metra", GameMenuSpecialBMagicMetra);   
    }
    if (Playerbmagic.alpha == true)
    {
    ItemMenu.addItem("Alpha", GameMenuSpecialBMagicAlpha);   
    }
    if (Playerbmagic.omega == true)
    {
    ItemMenu.addItem("Omega", GameMenuSpecialBMagicOmega);   
    }
  }
  else if (Player.active == "Player2")
  {
    if (Player2bmagic.earth == true)
    {
    ItemMenu.addItem("Earth", GameMenuSpecialBMagicEarth);   
    }
    if (Player2bmagic.drainhp == true)
    {
    ItemMenu.addItem("Drain Hp", GameMenuSpecialBMagicDrainhp);   
    }
    if (Player2bmagic.fire2 == true)
    {
    ItemMenu.addItem("Fire 2", GameMenuSpecialBMagicFire2);   
    }
    if (Player2bmagic.ice2 == true)
    {
    ItemMenu.addItem("Ice 2", GameMenuSpecialBMagicice2);   
    }
    if (Player2bmagic.lit2 == true)
    {
    ItemMenu.addItem("Lit 2", GameMenuSpecialBMagicLit2);   
    }
    if (Player2bmagic.earth2 == true)
    {
    ItemMenu.addItem("Earth 2", GameMenuSpecialBMagicEarth2);   
    }
    if (Player2bmagic.drainmp == true)
    {
    ItemMenu.addItem("Drain Mp", GameMenuSpecialBMagicDrainmp);   
    }
    if (Player2bmagic.aero == true)
    {
    ItemMenu.addItem("Aero", GameMenuSpecialBMagicAero);   
    }
    if (Player2bmagic.water == true)
    {
    ItemMenu.addItem("Water", GameMenuSpecialBMagicWater);   
    }
    if (Player2bmagic.fire3 == true)
    {
    ItemMenu.addItem("Fire 3", GameMenuSpecialBMagicFire3);   
    }
    if (Player2bmagic.ice3 == true)
    {
    ItemMenu.addItem("Ice 3", GameMenuSpecialBMagicIce3);   
    }
    if (Player2bmagic.lit3 == true)
    {
    ItemMenu.addItem("Lit 3", GameMenuSpecialBMagicLit3);   
    }
    if (Player2bmagic.earth3 == true)
    {
    ItemMenu.addItem("Earth 3", GameMenuSpecialBMagicEarth3);   
    }
    if (Player2bmagic.aera == true)
    {
    ItemMenu.addItem("Aera", GameMenuSpecialBMagicAera);   
    }
    if (Player2bmagic.tidelwave == true)
    {
    ItemMenu.addItem("Tidel Wave", GameMenuSpecialBMagicTidelwave);   
    }
    if (Player2bmagic.metra == true)
    {
    ItemMenu.addItem("Metra", GameMenuSpecialBMagicMetra);   
    }
    if (Player2bmagic.alpha == true)
    {
    ItemMenu.addItem("Alpha", GameMenuSpecialBMagicAlpha);   
    }
    if (Player2bmagic.omega == true)
    {
    ItemMenu.addItem("Omega", GameMenuSpecialBMagicOmega);   
    }
  }
  else if (Player.active == "Player3")
  {
    if (Player3bmagic.earth == true)
    {
    ItemMenu.addItem("Earth", GameMenuSpecialBMagicEarth);   
    }
    if (Player3bmagic.drainhp == true)
    {
    ItemMenu.addItem("Drain Hp", GameMenuSpecialBMagicDrainhp);   
    }
    if (Player3bmagic.fire2 == true)
    {
    ItemMenu.addItem("Fire 2", GameMenuSpecialBMagicFire2);   
    }
    if (Player3bmagic.ice2 == true)
    {
    ItemMenu.addItem("Ice 2", GameMenuSpecialBMagicice2);   
    }
    if (Player3bmagic.lit2 == true)
    {
    ItemMenu.addItem("Lit 2", GameMenuSpecialBMagicLit2);   
    }
    if (Player3bmagic.earth2 == true)
    {
    ItemMenu.addItem("Earth 2", GameMenuSpecialBMagicEarth2);   
    }
    if (Player3bmagic.drainmp == true)
    {
    ItemMenu.addItem("Drain Mp", GameMenuSpecialBMagicDrainmp);   
    }
    if (Player3bmagic.aero == true)
    {
    ItemMenu.addItem("Aero", GameMenuSpecialBMagicAero);   
    }
    if (Player3bmagic.water == true)
    {
    ItemMenu.addItem("Water", GameMenuSpecialBMagicWater);   
    }
    if (Player3bmagic.fire3 == true)
    {
    ItemMenu.addItem("Fire 3", GameMenuSpecialBMagicFire3);   
    }
    if (Player3bmagic.ice3 == true)
    {
    ItemMenu.addItem("Ice 3", GameMenuSpecialBMagicIce3);   
    }
    if (Player3bmagic.lit3 == true)
    {
    ItemMenu.addItem("Lit 3", GameMenuSpecialBMagicLit3);   
    }
    if (Player3bmagic.earth3 == true)
    {
    ItemMenu.addItem("Earth 3", GameMenuSpecialBMagicEarth3);   
    }
    if (Player3bmagic.aera == true)
    {
    ItemMenu.addItem("Aera", GameMenuSpecialBMagicAera);   
    }
    if (Player3bmagic.tidelwave == true)
    {
    ItemMenu.addItem("Tidel Wave", GameMenuSpecialBMagicTidelwave);   
    }
    if (Player3bmagic.metra == true)
    {
    ItemMenu.addItem("Metra", GameMenuSpecialBMagicMetra);   
    }
    if (Player3bmagic.alpha == true)
    {
    ItemMenu.addItem("Alpha", GameMenuSpecialBMagicAlpha);   
    }
    if (Player3bmagic.omega == true)
    {
    ItemMenu.addItem("Omega", GameMenuSpecialBMagicOmega);   
    }
  }
    ItemMenu.addItem("Cancel", GameMenu);
    ItemMenu.execute(6, 34, 272, 40);
}

function GameMenuSpecialBMagicFire()
{
SpecialThing("Fire", "A basic black magic spell that hurts a target with fire.", "5", "Hurts a target with fire damage");
}
function GameMenuSpecialBMagicIce()
{
SpecialThing("Ice", "A basic black magic spell that hurts a target with ice.", "5", "Hurts a target with ice damage");
}
function GameMenuSpecialBMagicLit()
{
SpecialThing("Lit", "A basic black magic spell that hurts a target with lightning.", "5", "Hurts a target with lightning damage");
}
function GameMenuSpecialBMagicEarth()
{
SpecialThing("Earth", "A black magic spell that hurts a target by shaking the ground.", "12", "Hurts all targets with earth damage");
}
function GameMenuSpecialBMagicDrainhp()
{
SpecialThing("Drain Hp", "A black magic that damages a target and heals the caster.", "12", "Hurts a target and heals the caster");
}
function GameMenuSpecialBMagicFire2()
{
SpecialThing("Fire 2", "An advanced version of the fire spell.", "15", "Hurts a target with fire damage");
}
function GameMenuSpecialBMagicIce2()
{
SpecialThing("Ice 2", "An advanced version of the ice spell.", "15", "Hurts a target with ice damage");
}
function GameMenuSpecialBMagicLit2()
{
SpecialThing("Lit 2", "An advanced version of the lit spell.", "15", "Hurts a target with lightning damage");
}
function GameMenuSpecialBMagicEarth2()
{
SpecialThing("Earth 2", "An advanced of the earth spell.", "25", "Hurts all targets with earth damage");
}
function GameMenuSpecialBMagicDrainmp()
{
SpecialThing("Drain Mp", "A black magic that decreases a target's mp and gives it to the caster.", "5", "Hurts a target's mp and heals the caster's");
}
function GameMenuSpecialBMagicAero()
{
SpecialThing("Aero", "A wind spell that damages one target.", "30", "Hurts a target with wind damage");
}
function GameMenuSpecialBMagicWater()
{
SpecialThing("Water", "A water spell that damages one target.", "30", "Hurts a target with water damage");
}
function GameMenuSpecialBMagicFire3()
{
SpecialThing("Fire 3", "A high level black magic that hurts all targets with fire.", "45", "Hurts all targets with fire damage");
}
function GameMenuSpecialBMagicIce3()
{
SpecialThing("Ice 3", "A high level black magic that hurts all targets with ice.", "45", "Hurts all targets with ice damage");
}
function GameMenuSpecialBMagicLit3()
{
SpecialThing("Lit 3", "A high level black magic that hurts all targets with lightning.", "45", "Hurts all targets with lightning damage");
}
function GameMenuSpecialBMagicEarth3()
{
SpecialThing("Earth 3", "A high level black magic that hurts all targets by shaking the ground.", "50", "Hurts all targets with earth damage");
}
function GameMenuSpecialBMagicAera()
{
SpecialThing("Aera", "A more advanced version of the aero spell that damages all targets.", "60", "Hurts all targets with wind damage");
}
function GameMenuSpecialBMagicTidelwave()
{
SpecialThing("Tidel Wave", "A more advanced version of the water spell that damages all targets.", "60", "Hurts all targets with water damage");
}
function GameMenuSpecialBMagicMetra()
{
SpecialThing("Metra", "An extremely high level black magic spell that delivers non-elemental damage to all targets.", "75", "Hurts all targets");
}
function GameMenuSpecialBMagicAlpha()
{
SpecialThing("Alpha", "An ultimate black magic.  Hurts a target with non-elemental damage.", "125", "Hurts a target");
}
function GameMenuSpecialBMagicOmega()
{
SpecialThing("Omega", "The most powerful black magic.  Hurts all targets with non-elemental damage.", "200", "Hurts all targets");
}

function GameMenuSpecialCustom()
{

  RenderMap();
  
  WindowStyle.drawWindow(8, 8, 90, 12);
  Font.drawText(10, 10, "What spell?");
    
  var ItemMenu = new Menu();
  ItemMenu.font         = Font;
  ItemMenu.window_style = WindowStyle;
  ItemMenu.arrow        = Arrow;

    if (Player.cmagic.telekinesispres == true)
    {
    ItemMenu.addItem(Player.cmagic.telekinesis, GameMenuSpecialTelekinesis);
    }
    if (Player.cmagic.dieasepres == true)
    {
    ItemMenu.addItem(Player.cmagic.diease, GameMenuSpecialDiease);
    }
    if (Player.cmagic.explodepres == true)
    {
    ItemMenu.addItem(Player.cmagic.explode, GameMenuSpecialExplode);
    }
    if (Player.cmagic.explode2pres == true)
    {
    ItemMenu.addItem(Player.cmagic.explode2, GameMenuSpecialExplode2);
    }
    if (Player.cmagic.plaguepres == true)
    {
    ItemMenu.addItem(Player.cmagic.plague, GameMenuSpecialPlague);
    }
    if (Player.cmagic.flarepres == true)
    {
    ItemMenu.addItem(Player.cmagic.flare, GameMenuSpecialFlare);
    }
    if (Player.cmagic.holdpres == true)
    {
    ItemMenu.addItem(Player.cmagic.hold, GameMenuSpecialHold);
    }
    if (Player.cmagic.encounterpres == true)
    {
    ItemMenu.addItem(Player.cmagic.encounter, GameMenuSpecialEncounter);
    }
    if (Player.cmagic.multiuppres == true)
    {
    ItemMenu.addItem(Player.cmagic.multiup, GameMenuSpecialMultiup);
    }
    if (Player.cmagic.mpregainpres == true)
    {
    ItemMenu.addItem(Player.cmagic.mpregain, GameMenuSpecialMpregain);
    }
    if (Player.cmagic.anglicraypres == true)
    {
    ItemMenu.addItem(Player.cmagic.anglicray, GameMenuSpecialAnglicray);
    }

    ItemMenu.addItem("Cancel", GameMenu);
    ItemMenu.execute(6, 34, 272, 40);
}

function GameMenuSpecialTelekinesis()
{
SpecialThing(Player.cmagic.telekinesis, "A weak magic spell that deals non-elemental damage to a target.", "5", "Hurts one target");
}
function GameMenuSpecialDiease()
{
SpecialThing(Player.cmagic.diease, "A magic spell that damages one target.", "12", "Hurts one target with sickness damage");
}
function GameMenuSpecialExplode()
{
SpecialThing(Player.cmagic.explode, "A magic spell that damages all targets.", "30", "Hurts all targets with fire damage");
}
function GameMenuSpecialExplode2()
{
SpecialThing(Player.cmagic.explode2, "A more advanced version of the " + Player.cmagic.explode + " spell.", "50", "Hurts all targets with fire damage");
}
function GameMenuSpecialPlague()
{
SpecialThing(Player.cmagic.plague, "A more advanced version of the " + Player.cmagic.diease + " spell.", "50", "Hurts all targets with sickness damage");
}
function GameMenuSpecialFlare()
{
SpecialThing(Player.cmagic.flare, "A very powerful spell that deals non-elemental damage to one target.", "75", "Hurts a target with non-elemental damage");
}
function GameMenuSpecialHold()
{
SpecialThing(Player.cmagic.hold, "A simple magic spell that prevents a monster from moving.", "15", "Stops a monster for two turns");
}
function GameMenuSpecialEncounter()
{
SpecialThing(Player.cmagic.encounter, "A magic spell that can change the rate of how many monsters the party will engage.", "15", "Changes encounter rate");
}
function GameMenuSpecialMultiup()
{
SpecialThing(Player.cmagic.multiup, "A magic spell that will raise the attack, defense, and evade of one person.", "45", "Raises attack, defense, and evade of one person");
}
function GameMenuSpecialMpregain()
{
SpecialThing(Player.cmagic.mpregain, "A magic spell that will recover a person's mp over time.", "75", "Recovers a person's mp over time");
}
function GameMenuSpecialAnglicray()
{
SpecialThing(Player.cmagic.anglicray, "A very powerful white magic that hurts one target with holy damage.", "75", "Hurts one target with holy damage");
}

function GameMenuSpecialSong()
{
  RenderMap();
  
  WindowStyle.drawWindow(8, 8, 85, 12);
  Font.drawText(10, 10, "What song?");
    
  var ItemMenu = new Menu();
  ItemMenu.font         = Font;
  ItemMenu.window_style = WindowStyle;
  ItemMenu.arrow        = Arrow;


  if (Player.active == "Player1")
  {
    if (Playerbard.warsong == true)
    {
    ItemMenu.addItem("War Song", GameMenuSpecialWarsong);
    }
    if (Playerbard.intimidate == true)
    {
    ItemMenu.addItem("Intimidate", GameMenuSpecialIntimidate);
    }
    if (Playerbard.animals == true)
    {
    ItemMenu.addItem("Animals", GameMenuSpecialAnimals);
    }
    if (Playerbard.resonance == true)
    {
    ItemMenu.addItem("Resonance", GameMenuSpecialResonance);
    }
  }
  else if (Player.active == "Player2")
  {
    if (Player2bard.warsong == true)
    {
    ItemMenu.addItem("War Song", GameMenuSpecialWarsong);
    }
    if (Player2bard.intimidate == true)
    {
    ItemMenu.addItem("Intimidate", GameMenuSpecialIntimidate);
    }
    if (Player2bard.animals == true)
    {
    ItemMenu.addItem("Animals", GameMenuSpecialAnimals);
    }
    if (Player2bard.resonance == true)
    {
    ItemMenu.addItem("Resonance", GameMenuSpecialResonance);
    }
  }
  else if (Player.active == "Player3")
  {
    if (Player3bard.warsong == true)
    {
    ItemMenu.addItem("War Song", GameMenuSpecialWarsong);
    }
    if (Player3bard.intimidate == true)
    {
    ItemMenu.addItem("Intimidate", GameMenuSpecialIntimidate);
    }
    if (Player3bard.animals == true)
    {
    ItemMenu.addItem("Animals", GameMenuSpecialAnimals);
    }
    if (Player3bard.resonance == true)
    {
    ItemMenu.addItem("Resonance", GameMenuSpecialResonance);
    }
  }  
    ItemMenu.addItem("Cancel", GameMenu);
    ItemMenu.execute(6, 34, 272, 40);
}

function GameMenuSpecialWarsong()
{
SpecialThing("War Song", "A song that boosts the attack power of all allies in battle.", "12", "Raises Attack power of the party");
}
function GameMenuSpecialIntimidate()
{
SpecialThing("Intimidate", "A song that lower the attack power of all targets in battle.", "15", "Lowers Attack power of all monsters");
}
function GameMenuSpecialAnimals()
{
SpecialThing("Animals", "A song that calls nearby animals to attack all targets.", "15", "Deals physical damage to all targets");
}
function GameMenuSpecialResonance()
{
SpecialThing("Resonance", "A song that causes the ground to shake violently.", "25", "Deals earth damage to all targets");
}